//
//  BaseViewController.h
//  QuWanWang
//
//  Created by lizq on 15/8/14.
//  Copyright (c) 2015年 tony. All rights reserved.
//
#define UIColorRGB(r,g,b) [UIColor colorWithRed:(r)/225.0 green:(g)/225.0 blue:(b)/225.0 alpha:1]
#define UIColorFF(x) [UIColor colorWithRed:((x)>>16)/225.0 green:(((x)>>8)&0x00ff)/225.0 blue:((x)&0x0000ff)/225.0 alpha:1]

#import <UIKit/UIKit.h>

@protocol BaseViewControllerFrameDelegate <NSObject>
- (CGRect)beginFrame;
- (CGRect)endFrame;
@end

@class BaseNavigationViewController;

@interface BaseViewController : UIViewController <BaseViewControllerFrameDelegate>
@property(nonatomic,strong)UIView *topView;//状态栏和头部
@property(nonatomic,assign)CGSize viewSize;//页面size
@property(nonatomic,strong)UILabel *titleLabel;//页面标题
@property(nonatomic,strong)UIButton *leftButton;//返回按钮
@property(nonatomic,strong)UIButton *rightButton;//右边按钮
@property(nonatomic,strong)UIScrollView *main;//内容

#pragma mark init view
- (void)initTitle:(NSString *)title;
- (void)initLeftButtonDef:(NSString *)def sel:(NSString *)sel;
- (void)initLeftButtonWithTitle:(NSString *)title;
- (void)initRightButtonDef:(NSString *)def sel:(NSString *)sel;
- (void)initRightButtonWithTitile:(NSString *)title;


#pragma button events
- (void)clickBackButton:(UIButton *)btn;
- (void)clickRightButton:(UIButton *)btn;
@end
